const http = require("http")

const fs = require("fs")

const revers = http.createServer((req,res)=>{
    let url = req.url

    if(url === "/favicon.ico"){
        res.end("404")
        return
    }
    console.log(url);
    let str = fs.readFileSync(__dirname + url)
    res.end(str)
})  


revers.listen(80,()=>{
    console.log("开启监听");
})